import request from '@/utils/request'
import { getToken } from '@/utils/auth'

// 获取路由信息
export function getRouters() {
  // 获取当前租户ID
  const tenantId = localStorage.getItem('tenantId') || '1'
  const token = getToken()
  
  console.log('调用getRouters API，租户ID:', tenantId, 'Token:', !!token)
  
  return request({
    url: '/getRouters',
    method: 'get',
    headers: {
      'X-Tenant-Id': tenantId,
      'Authorization': 'Bearer ' + token
    }
  })
}